#include "Texture.h"

const AssetType RE_Texture::m_TextureType = "Texture";

RE_Texture::RE_Texture(Resource & res) : m_Source(res)
{
	pd3d9Texture = NULL;
}
RE_Texture::~RE_Texture()
{
	Release();
}

bool RE_Texture::Restore()
{
	RandomEngineApp::Get()->GetRenderer()->VUpdateTexture(this);
	return true;
}
bool RE_Texture::Release()
{
	if(this->pd3d9Texture == NULL)
	{
		return true;
	}
	RandomEngineApp::Get()->GetRenderer()->VReleaseTexture(this);
	return true;
}